import service from "../utils/request";

// 登录
export function login(data) {
    return service({
        url: "/login/userName/v2",
        method: "post",
        data
    })
}


// 获取token令牌
export function checkToken() {
    return service({
        url: "/user/checkToken",
        method: "get",
    })
}

// 获取用户信息
export function userInfo() {
    return service({
        url:"user/info",
        method:"get"
    })
}

// 上传文件
export function uploadFile(data){
    return service({
        url:"/fileUpload",
        method:"post",
        data,
        headers:{
            "content-type":"multipart/form-data"
        }
    })
}